.projects-page {
  padding: 24px;
  min-height: 100vh;
  background: #f5f5f5;
}

.projects-header {
  margin-bottom: 24px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.projects-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.projects-title h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #262626;
}

.projects-count {
  font-size: 14px;
  color: #8c8c8c;
  font-weight: normal;
}

.projects-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.projects-content {
  min-height: 400px;
}

.projects-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  background: white;
  border-radius: 8px;
}

.projects-empty {
  background: white;
  border-radius: 8px;
  padding: 60px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.projects-grid {
  transition: all 0.3s ease;
}

/* 拖拽包装器 */
.sortable-project-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 8px;
  height: 100%;
}

.sortable-project-wrapper .drag-handle {
  cursor: grab;
  color: #bfbfbf;
  font-size: 18px;
  display: flex;
  align-items: flex-start;
  padding: 12px 4px;
  margin-right: -4px;
  transition: all 0.3s;
  opacity: 0;
  visibility: hidden;
  flex-shrink: 0;
}

.sortable-project-wrapper:hover .drag-handle {
  opacity: 1;
  visibility: visible;
}

.sortable-project-wrapper .drag-handle:hover {
  color: #1890ff;
}

.sortable-project-wrapper .drag-handle:active {
  cursor: grabbing;
}

.sortable-project-wrapper .project-card {
  flex: 1;
  margin: 0;
}

/* 列表视图样式 */
.projects-grid.list .sortable-project-wrapper {
  display: flex;
}

.projects-grid.list .project-card {
  width: 100%;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .projects-page.mobile {
    padding: 12px;
    padding-bottom: 80px; /* 为底部导航留出空间 */
    background: white;
  }

  .projects-header {
    padding: 16px;
    margin-bottom: 16px;
  }

  .projects-title {
    margin-bottom: 12px;
  }

  .projects-title h1 {
    font-size: 20px;
  }

  .projects-count {
    font-size: 13px;
  }

  .projects-actions {
    flex-direction: column;
  }

  .projects-actions > * {
    width: 100%;
  }

  /* 移动端隐藏拖拽手柄 */
  .sortable-project-wrapper .drag-handle {
    display: none;
  }

  .sortable-project-wrapper {
    gap: 0;
  }

  .projects-empty {
    padding: 40px 16px;
  }
}

/* 拖拽时的样式 */
.projects-grid [data-dragging='true'] {
  opacity: 0.5;
  cursor: grabbing;
}

.projects-grid [data-dragging='true'] .project-card {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transform: rotate(2deg);
}

/* 搜索框样式增强 */
.projects-actions .ant-input-search {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  border-radius: 6px;
}

.projects-actions .ant-input-search:hover,
.projects-actions .ant-input-search:focus-within {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 视图切换按钮样式 */
.projects-actions .ant-space-compact .ant-btn {
  min-width: 40px;
}

/* 空状态优化 */
.projects-empty .ant-empty-description {
  color: #8c8c8c;
  font-size: 14px;
}

/* 加载状态优化 */
.projects-loading .ant-spin-text {
  margin-top: 12px;
  color: #8c8c8c;
}

/* 响应式断点调整 */
@media (min-width: 769px) and (max-width: 1024px) {
  .projects-page {
    padding: 20px;
  }

  .projects-title h1 {
    font-size: 22px;
  }
}

@media (min-width: 1025px) {
  .projects-page {
    max-width: 1600px;
    margin: 0 auto;
  }
}

/* 过渡动画 */
.project-card-enter {
  opacity: 0;
  transform: translateY(20px);
}

.project-card-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease;
}

.project-card-exit {
  opacity: 1;
}

.project-card-exit-active {
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}
